<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<c:set var="path" value="..${ctx}/define/action"/>

<div class="pageHeader">
	<form method="post" action="${path}/consultSearch.html" onsubmit="return dwzSearch(this, 'dialog');">
	<input type="hidden" name="js_back_function" value="${js_back_function}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>操作分类:</label>
				<select class="combox" name="sort" >
					<option value="all">所有操作</option>
					<c:if test="${! empty sorts }">
					<c:forEach var="vo" items="${sorts}">
						<option value="${vo}"  <c:if test="${vo == sort}">selected="selected"</c:if> >${vo}</option>
					</c:forEach>
					</c:if>
				</select>
			</li>
			<li>
				<label>操作名称:</label>
				<input type="text" id="actionName" name="actionName" value="${actionName}" />
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" onclick="kk();" warn="请选择部门">选择带回</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">

	<table class="table" layoutH="118" targetType="dialog" width="100%">
		<thead>
			<tr>
				<th width="30"></th>
				<th width="160" orderfield="orgName">操作单元名称</th>
				<th width="80" orderfield="orgNum">分类</th>
				<th width="240" orderfield="leader">描述</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${! empty list}">
			<c:forEach var="vo" items="${list}">
			<c:set var="data" value="${vo.value}" />
			<tr>
				<td><input type="radio" id="orgId" name="orgId" value="${data.name}"/></td>
				<td>${data.name}</td>
				<td>${data.sort}</td>
				<td>${data.description}</td>
			</tr>
			</c:forEach>
			</c:if>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共2条</span>
		</div>
	</div>
</div>
<script type="text/javascript">
function kk() {
	var str = $("input[name='orgId']:checked").val();
	if(str === undefined || str == ""){
		alertMsg.error("请先选择要带回的数据！");
		return;
	}
	var funname = $("input[name='js_back_function']").val();
	var func = eval(funname);
	new func(str);
}

</script>